home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Views
/
SolidFrame.cp
< prev
next >
Wrap
Text File
|
1997-06-28
|
993b
|
41 lines
// SolidFrame.cp
#ifndef SolidFrame_h
#include "SolidFrame.h"
#endif
#ifndef ForegroundColorMaintainer_h
#include "ForegroundColorMaintainer.h"
#endif
#ifndef ViewMap_h
#include "ViewMap.h"
#endif
void SolidFrame::DrawBorder( const ViewMap& map, Rectangle interior ) const
{
ForegroundColorMaintainer cm( ForegroundColor() );
Rectangle bounds( map.Bounds() );
Rectangle top( bounds.left, bounds.top, bounds.right, interior.top );
Rectangle bottom( bounds.left, interior.bottom, bounds.right, bounds.bottom );
Rectangle left( bounds.left, interior.top, interior.left, interior.bottom );
Rectangle right( interior.right, interior.top, bounds.right, interior.bottom );
PaintRect( &top );
PaintRect( &left );
PaintRect( &right );
PaintRect( &bottom );
}
void SolidFrame::ForegroundColorChanged()
{
ViewMap map( *this );
if ( !map.Visible() )
return;
RegionObject region( map.Bounds() );
region -= Interior().Bounds();
ViewMap( *this ).Invalidate( region );
}